home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
e
/
mailinglists
/
amigae.0294feb.archive
/
000111_donews!crash!rb…rmstadt.de!anh_Mon, 28 Feb 94 04:43:38 PST.msg
< prev
next >
Wrap
Internet Message Format
|
1994-05-26
|
9KB
Received: by bkhouse.cts.com (V1.17-beta/Amiga)
id <1xq9@bkhouse.cts.com>; Mon, 28 Feb 94 04:43:38 PST
Received: from crash by donews.cts.com with uucp
(Smail3.1.28.1 #18) id m0pb6C1-0002SvC; Mon, 28 Feb 94 03:31 PST
Received: from rbhp89.rbg.informatik.th-darmstadt.de by crash.cts.com with smtp
(Smail3.1.28.1 #18) id m0pb5vu-0000RvC; Mon, 28 Feb 94 03:14 PST
Received: from rbhp44.rbg.informatik.th-darmstadt.de by rbhp89.rbg.informatik.th-darmstadt.de with SMTP
(1.36.108.4/15.6) id AA22639; Mon, 28 Feb 1994 12:14:00 +0100
Received: by rbhp44.rbg.informatik.th-darmstadt.de
(1.36.108.4/15.6) id AA18820; Mon, 28 Feb 1994 12:14:08 +0100
Message-Id: <m0pb5vu-0000RvC@crash.cts.com>
Date: Mon, 28 Feb 94 12:14:04 MEZ
Full-Name: Olivier Anh
In-Reply-To: <9402251437.AA01104@plucky.safb.af.mil>; from "Barry D Wills" at Feb 25, 94 8:37 am
Mailer: Elm [revision: 66.25]
From: Olivier Anh <anh@rbhp56.rbg.informatik.th-darmstadt.de>
To: AmigaE@bkhouse.cts.com (The AmigaE Mailing List)
Subject: HHEELLPP !!!!!
Hi !
I'm coding a GUI for LhA... Working on several problems at the same time,
I found that they are going to the same problem : saving a list of string
into my own array :
I'm reading the rtfilelist (ReqTools.library) and want to save the members
filelist.name into my own array of string...
This array is used as pointers to string :
FOR i:=0 TO 10 DO my-array[i]:=String(100)
I try to make a StrCopy(my-array[x], filelist.name,ALL) :-> GURU
then assigninga PTR TO CHAR variable to my-array[x] and copy characters per
characters in a loop :
FOR i:=0 TO EstrLen(filelist.name) DO s[i]:=filelist.name[i] :-> GURU
The same problem occurs when I'm reading a file and save each line in my-array2
How can I do that ?
Following an example of the second example
Thanx
--
-------------------------------------------------------------------------------
/ / Olivier ANH |' And may the Force be with You ! '
\ X / anh@rbg.informatik.th-darmstadt.de | - Return of the Jedi -
-------------------------------------------------------------------------------
/* IntuiSup & own ListView test UNDER WB1.3 */
MODULE 'intuisup',
'graphics/text',
'intuition/intuition',
'intuition/screens',
'libraries/intuisup'
ENUM NONE,ERR_INTUISUP,ERR_REQTOOLS,ERR_WINDOW,BRK
CONST WIDCMP = IDCMP_CLOSEWINDOW OR
IDCMP_GADGETUP OR
IDCMP_GADGETDOWN OR
IDCMP_MOUSEMOVE,
WFLAGS = WFLG_DRAGBAR OR
WFLG_DEPTHGADGET OR
WFLG_CLOSEGADGET OR
WFLG_WINDOWACTIVE,
MAXGADGET = GADGETSIZE*15,
RENDERINFO = 0
DEF win : PTR TO window,
scr : PTR TO screen,
msg : PTR TO intuimessage,
loop, ri, glist, class, code, iaddress, speciallink,
txtattr,gaddata,
arccontlist[100] : ARRAY
PROC main() HANDLE
DEF i
intuisupbase:=OpenLibrary('intuisup.library',0)
IF intuisupbase=NIL THEN Raise(ERR_INTUISUP)
scr:=NIL
ri:=IgetRenderInfo(scr,RENDERINFO)
win:=OpenW(0,11,300,150,WIDCMP,WFLAGS,'Test',0,1,NIL)
IF win=NIL THEN Raise(ERR_WINDOW)
txtattr:=['topaz',8,0,0] : textattr
gaddata:=[ 7,$00000008,10, 16, 16, 82, 0,txtattr,0,0,0,
1,$00000806,30, 16,160, 8, 0,txtattr,0,0,0,
1,$00000806,30, 24,160, 8, 0,txtattr,0,0,0,
1,$00000806,30, 32,160, 8, 0,txtattr,0,0,0,
1,$00000806,30, 40,160, 8, 0,txtattr,0,0,0,
1,$00000806,30, 48,160, 8, 0,txtattr,0,0,0,
1,$00000806,30, 56,160, 8, 0,txtattr,0,0,0,
1,$00000806,30, 64,160, 8, 0,txtattr,0,0,0,
1,$00000806,30, 72,160, 8, 0,txtattr,0,0,0,
1,$00000806,30, 80,160, 8, 0,txtattr,0,0,0,
1,$00000806,30, 88,160, 8, 0,txtattr,0,0,0,
0, 0, 0,0, 0, 0, 0, 0,0,0,0] : gadgetdata
glist:=IcreateGadgets(ri,gaddata,0,11,NIL)
IdisplayGadgets(win,glist)
FOR i:=0 TO 99 DO arccontlist[i]:=String(100)
IF getarccontent()=FALSE THEN Raise(NONE)
loop:=TRUE
REPEAT
WaitPort(win.userport)
msg:=IgetMsg(win.userport)
IF CtrlC() THEN Raise(BRK)
class:=msg.class
code:=msg.code
iaddress:=msg.iaddress
speciallink:=msg.speciallink
IreplyMsg(msg)
SELECT class
WriteF('Selecting ')
CASE IDCMP_CLOSEWINDOW
WriteF('CloseWindow\n')
loop:=FALSE
CASE ISUP_ID
WriteF('Isup\n')
dogadget()
ENDSELECT
UNTIL loop=FALSE
closeall()
EXCEPT
closeall()
IF exception>0 THEN
WriteF('Couldn\at \s !\n',ListItem(['do anything',
'open IntuiSup.library',
'open ReqTools.library',
'open Window',
'continue\n*** User Break'],
exception))
ENDPROC
PROC dogadget()
DEF i
SELECT code
CASE 0
WriteF(' Scroller \d\n',iaddress)
Box(30,27,190,107,3)
Colour(1,0)
FOR i:=0 TO 9
TextF(30,33+(i*8),'\s',arccontlist[i])
ENDFOR
DEFAULT
WriteF(' Item \d\n',code)
ENDSELECT
ENDPROC
/* getarccontent read a LhA message and only save what is between '-------- '
NOTE : the WriteF() statements are here to debug
*/
PROC getarccontent()
DEF t[512] : STRING,
filehandle,
ok,
i,
maxitem,
k : PTR TO CHAR
WriteF(' Procedure getarccontent()\n')
IF FileLength('Esources:ELha.t')=-1
WriteF('GetArcList : Can\at find ELha TempFile !')
RETURN FALSE
ENDIF
IF (filehandle:=Open('Esources:ELha.t',OLDFILE))=NIL
WriteF('GetArcList : Can\at open ELha TempFile !')
RETURN FALSE
ENDIF
REPEAT
ok:=ReadStr(filehandle,t)
UNTIL ((ok=-1) OR (InStr(t,'-------- ',0)=0))
IF InStr(t,'-------- ',0)=0
i:=0
REPEAT
ok:=ReadStr(filehandle,t)
IF ((ok<>-1) AND (InStr(t,'-------- ',0)=-1))
MidStr(t,t,43,EstrLen(t)-42)
INC i
WriteF('\s\n - ',t)
/* Here are beginning my problems, sniff */
k:=arccontlist[i]
FOR ok:=0 TO StrLen(t)+1
WriteF('\c',t[ok])
k[ok]:=t[ok]
ENDFOR
/* The problems are ending here */
WriteF('\n')
ENDIF
UNTIL ((ok=-1) OR (InStr(t,'-------- ',0)=0))
ENDIF
WriteF('Close\n')
Close(filehandle)
maxitem:=i
IF i<=10 THEN maxitem:=10
WriteF('Displaying')
IsetGadgetAttributes(glist,0,0,0,10,maxitem,0)
Box(30, 27,190,107,3)
Colour(1,0)
FOR ok:=0 TO 9
TextF(30, 33+(ok*8),'\d, \s',ok,arccontlist[ok])
ENDFOR
WriteF(' End of getarccontent\n')
ENDPROC TRUE
PROC closeall()
IF ri THEN IfreeRenderInfo(ri)
IF glist THEN IfreeGadgets(glist)
IF intuisupbase THEN CloseLibrary(intuisupbase)
IF win THEN CloseW(win)
CleanUp(0)
ENDPROC
From donews!crash!dcs.gla.ac.uk!mccracal Mon, 28 Feb 94 04:43:48 PST
Received: by bkhouse.cts.com (V1.17-beta/Amiga)
id <1xqe@bkhouse.cts.com>; Mon, 28 Feb 94 04:43:48 PST
Received: from crash by donews.cts.com with uucp
(Smail3.1.28.1 #18) id m0pb6gS-0002SvC; Mon, 28 Feb 94 04:02 PST
Received: from vanuata.dcs.gla.ac.uk by crash.cts.com with smtp
(Smail3.1.28.1 #18) id m0pb6EN-000026C; Mon, 28 Feb 94 03:33 PST
Received: from attu.dcs.gla.ac.uk by goggins.dcs.gla.ac.uk with LOCAL SMTP (PP)
id <04471-0@goggins.dcs.gla.ac.uk>; Mon, 28 Feb 1994 11:33:03 +0000
Received: by attu.dcs.gla.ac.uk (4.1/Dumb) id AA04258;
Mon, 28 Feb 94 11:32:54 GMT
Date: Mon, 28 Feb 94 11:32:54 GMT
Message-Id: <9402281132.AA04258@attu.dcs.gla.ac.uk>
From: mccracal@dcs.gla.ac.uk
To: AmigaE@bkhouse.cts.com
Subject: Re: fd2module
> >> Yep! Definately wand fd2module <<
> >> Bob Monaghan <<
>
> Not really its easy just get your fd type fd2pragma (if uve got it)
> and then use prgama2module
>
> Its as easy as that!
>
Unfortunatly, no it isn't. I wrote fd2module because when I tried what you
have just suggested it didn't work!
Alex McCracken
Weinberg's Second Law:
If builders built buildings the way programmers wrote programs,
then the first woodpecker that came along would destroy civilization!